<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>用户信息管理</title>
		<link rel="stylesheet" href="css/lib/bootstrap.min.css"/>
		<script src="js/lib/bootstrap.min.js"></script>
		<script src="js/lib/angular.min.js"></script>
		<script src="js/base.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<style>	
		body{
			font-size:12px;
		}	
		table,
		th,
		td {
			border: 1px solid grey;
			border-collapse: collapse;
			padding: 5px;
			vertical-align: middle !important;
		}		
		table td:nth-child(odd) {
			background-color: #f1f1f1;
			
		}
		table td:nth-child(even) {
			
		}
		table tr:nth-child(even) {
			background-color:#ffffff;
		}
	</style>
	<body ng-app="myApp" ng-controller="customersCtrl">
		<div class="">
			<div style="padding:15px 5px 0px 5px;border:3px solid #ccc;margin-bottom:15px">
				<table class="table table-hover">
					<tbody>
						<tr>
							<td colspan="12">
								用户信息管理
							</td>						
						</tr>
						<tr>
							  <th class="text-center">序号</th>
							  <th class="text-center">用户ID</th>
							  <th class="text-center">手机</th>
							  <th class="text-center">贴牌</th>
							  <th class="text-center">等级</th>
							  <th class="text-center">品牌名称</th>
							  <th class="text-center">邮件</th>
							  <th class="text-center">上级用户</th>
							  <th class="text-center">上级用户手机</th>
							  <th class="text-center">有效状态</th>							 
							  <th class="text-center">结束时间</th>						
						</tr>
						<tr class="active" ng-repeat="x in lists">
							<td class="text-center">{{$index+1}}</td>
						    <td class="text-center">{{x.id }}</td>
						    <td class="text-center">{{x.phone }}</td>
						    <td class="text-center">{{x.brandId }}</td>
						    <td class="text-center">{{x.grade }}</td>
						    <td class="text-center">{{x.brandname}}</td>
						    <td class="text-center">{{x.email}}</td>
						    <td class="text-center">{{x.preUserId}}</td>
						    <td class="text-center">{{x.preUserPhone}}</td>
						    <td class="text-center">{{x.validStatus}}</td>						   
						    <td class="text-center">{{x.createTime}}</td>					
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</body>
	<script>
	var app = angular.module('myApp', []);
        app.controller('customersCtrl', function($scope, $http) {
        /*用户信息查询*/
        $http({
			method:'POST',
			parmas:{size:1000},
			url: window.baseUrl+'user/statistics'
		}).then(function successCallback(data){
				console.log("请求数据成功...")
				console.log(data.data)
				console.log(data.data.result.content)
				$scope.lists = data.data.result.content	
		}, function errorCallback(data) {
				console.log("请求数据失败...")
		     	console.log(data)
		});
});
</script>
</html>
